#include <stdio.h>
#include <time.h>
#include "demo.h"



int main()
{
    SString S = StrInit();
    SString T = StrInit();
    SString G = StrInit();
    char str[] = "aabaaaaaabajk";
    char str1[] = "aaaba";
    char str2[] = "abcaabbcabcaabdab";
    StrAssign(&S,str,strlen(str));
    StrAssign(&T,str1,strlen(str1));
    StrAssign(&G,str2,strlen(str2));
    int next[T.length];
    Get_Next(T,next);
    for (int i = 0; i < T.length; ++i) {
        printf("%d\t",next[i]);
    }
    printf("\n%d\n",Index_BF(S,T));
    printf("\n%d\n",Index_KMP(S,T,next));

    return 1;
}
